<?php
echo $this->Session->flash();
echo $this->Form->create('Requirement');
echo $this->Form->input("Requirement.id");
echo $this->Form->hidden("Requirement.call_id",array('type'=>'text'));
echo $this->Form->input("Requirement.tipo", array('label' => 'tipo', 'options' => array('Predio' => 'Predio', 'Propietario'=> 'Propietario'), 'empty' => 'Seleccione opción'));
echo $this->Form->input("Requirement.texto");
echo $this->Ajax->submit('Guardar', array('url' => array('controller' => 'Requirements', 'action' => 'edit'), 'update' => 'content', 'complete' => 'cargar()', 'loading' => "$('#loader').show();", 'loaded' => "$('#loader').hide();cargar();"));

echo $this->Form->end();
?>
<div id="loader" style="display:none;">
    <?php echo $this->Html->image('loading.gif', array('alt' => 'CakePHP')) ?>
</div>
